package me

import java.util

import scala.collection.mutable
import scala.collection.JavaConverters._



/**
  * Created by lzd on 2019/1/25.
  */
object arr {
  def main(args: Array[String]): Unit = {

  }
  def arr: Unit = {
    //定长数组
    var imArr = new Array[String](10)
    //不定长数组
    var muArr = new mutable.ArrayBuffer[String]

    //定长转不定长
    val arrBuffer: mutable.Buffer[String] = imArr.toBuffer

    //不定长转定长
    val toArray: Array[String] = muArr.toArray

    //scala 转 java
    val asJava: util.List[String] = arrBuffer.asJava

    //java 转 scala

    val asScala: mutable.Buffer[String] = asJava.asScala

  }
}
